package com.fary.feign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

/**
 *
 */
public class FeignController {

    @Autowired
    private UserFeign userFeign;

    @GetMapping("/callHello")
    public String callHello() {
        //return restTemplate.getForObject("http://localhost:8083/house/hello",String.class);
        //String result = restTemplate.getForObject("http://eureka-producer/user/hello",String.class);
        String result = userFeign.hello();
        System.out.println("调用结果：" + result);
        return result;
    }

}
